package com.crk.controller;


import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.crk.service.IResourceService;
import com.crk.util.ReportResult;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author com.crk
 * @since 2021-03-25
 */
@CrossOrigin
@RestController
@RequestMapping("/resource")
public class ResourceController {

	@Autowired
	private IResourceService resService;
	
	
	@RequestMapping("/getRes")
	public ReportResult getInfo(){
		ReportResult result = new ReportResult();
		List<String> xlist = resService.selectResName();
		result.setXlist(xlist);
		List<Integer> ylist = resService.selectResMargin();
		result.setYlist(ylist);
		return result;
	}
}

